package com.ruoyi.system.service.impl;

import java.util.List;
import cn.hutool.core.util.ObjectUtil;
import com.ruoyi.common.constant.UserConstants;
import com.ruoyi.common.core.text.Convert;
import com.ruoyi.common.exception.ServiceException;
import com.ruoyi.common.utils.StringUtils;
import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.system.domain.vo.AH5vipTransVO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.AH5vipTransMapper;
import com.ruoyi.system.domain.AH5vipTrans;
import com.ruoyi.system.service.IAH5vipTransService;

/**
 * 转让vipService业务层处理
 *
 * @author gf
 * @date 2024-12-12
 */
@Service
public class AH5vipTransServiceImpl implements IAH5vipTransService {
    @Autowired
    private AH5vipTransMapper aH5vipTransMapper;

    /**
     * 查询转让vip
     *
     * @param id 转让vip主键
     * @return 转让vip
     */
    @Override
    public AH5vipTrans selectAH5vipTransById(Long id) {
        return aH5vipTransMapper.selectAH5vipTransById(id);
    }

    /**
     * 查询转让vip列表
     *
     * @param aH5vipTrans 转让vip
     * @return 转让vip
     */
    @Override
    public List<AH5vipTrans> selectAH5vipTransList(AH5vipTrans aH5vipTrans) {
        return aH5vipTransMapper.selectAH5vipTransList(aH5vipTrans);
    }

    /**
     * 新增转让vip
     *
     * @param aH5vipTrans 转让vip
     * @return 结果
     */
    @Override
    public int insertAH5vipTrans(AH5vipTrans aH5vipTrans) {
        aH5vipTrans.setCreateTime(DateUtils.getNowDate());
        return aH5vipTransMapper.insertAH5vipTrans(aH5vipTrans);
    }

    /**
     * 修改转让vip
     *
     * @param aH5vipTrans 转让vip
     * @return 结果
     */
    @Override
    public int updateAH5vipTrans(AH5vipTrans aH5vipTrans) {
        aH5vipTrans.setUpdateTime(DateUtils.getNowDate());
    return aH5vipTransMapper.updateAH5vipTrans(aH5vipTrans);
    }

    /**
     * 批量删除转让vip
     *
     * @param ids 需要删除的转让vip主键
     * @return 结果
     */
    @Override
    public int deleteAH5vipTransByIds(Long[] ids) {
        return aH5vipTransMapper.deleteAH5vipTransByIds(ids);
    }

    /**
     * 删除转让vip信息
     *
     * @param id 转让vip主键
     * @return 结果
     */
    @Override
    public int deleteAH5vipTransById(Long id) {
        return aH5vipTransMapper.deleteAH5vipTransById(id);
    }

    /**
     * 批量逻辑删除转让vip
     *
     * @param ids 需要删除的转让vip主键
     * @return 结果
     */
    @Override
    public int logicDeleteAH5vipTransByIds(Long[] ids) {
        return aH5vipTransMapper.logicDeleteAH5vipTransByIds(ids);
    }
    /**
     * 逻辑删除转让vip信息
     *
     * @param id 转让vip主键
     * @return 结果
     */
    @Override
    public int logicDeleteAH5vipTransById(Long id) {
        return aH5vipTransMapper.logicDeleteAH5vipTransById(id);
    }

    @Override
    public AH5vipTransVO selectAH5vipTransXcxList(AH5vipTrans ah5vipTrans) {
        return aH5vipTransMapper.selectAH5vipTransXcxList(ah5vipTrans);
    }

}
